package thisgame;

public abstract class Drawable implements Comparable<Drawable> {
	private int vOrder;
	private int layer;
	
	public Drawable(int vOrder, int layer) {
		this.vOrder = vOrder;
		this.layer = layer;
	}
	
	public int getTileYCoord() {
		return vOrder;
	}
	public int getLayer() {
		return layer;
	}
	public int compareTo(Drawable other) {
		int vOrd = getTileYCoord() - other.getTileYCoord();
		if (vOrd == 0) {
			return getLayer() - other.getLayer();
		} else {
			return vOrd;
		}
	}
	
	public abstract void draw();
}
